package com.ruoyi.announcements.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.announcements.mapper.AnnouncementsMapper;
import com.ruoyi.announcements.domain.Announcements;
import com.ruoyi.announcements.service.IAnnouncementsService;

/**
 * 系统公告Service业务层处理
 * 
 * @author anyunyi
 * @date 2025-05-29
 */
@Service
public class AnnouncementsServiceImpl implements IAnnouncementsService 
{
    @Autowired
    private AnnouncementsMapper announcementsMapper;

    /**
     * 查询系统公告
     * 
     * @param id 系统公告主键
     * @return 系统公告
     */
    @Override
    public Announcements selectAnnouncementsById(Long id)
    {
        return announcementsMapper.selectAnnouncementsById(id);
    }

    /**
     * 查询系统公告列表
     * 
     * @param announcements 系统公告
     * @return 系统公告
     */
    @Override
    public List<Announcements> selectAnnouncementsList(Announcements announcements)
    {
        return announcementsMapper.selectAnnouncementsList(announcements);
    }

    /**
     * 新增系统公告
     * 
     * @param announcements 系统公告
     * @return 结果
     */
    @Override
    public int insertAnnouncements(Announcements announcements)
    {
        return announcementsMapper.insertAnnouncements(announcements);
    }

    /**
     * 修改系统公告
     * 
     * @param announcements 系统公告
     * @return 结果
     */
    @Override
    public int updateAnnouncements(Announcements announcements)
    {
        return announcementsMapper.updateAnnouncements(announcements);
    }

    /**
     * 批量删除系统公告
     * 
     * @param ids 需要删除的系统公告主键
     * @return 结果
     */
    @Override
    public int deleteAnnouncementsByIds(Long[] ids)
    {
        return announcementsMapper.deleteAnnouncementsByIds(ids);
    }

    /**
     * 删除系统公告信息
     * 
     * @param id 系统公告主键
     * @return 结果
     */
    @Override
    public int deleteAnnouncementsById(Long id)
    {
        return announcementsMapper.deleteAnnouncementsById(id);
    }
}
